﻿using System;
using System.ServiceModel;
using ServiceContract.DataContracts.CarModels;
using ServiceContract.DataContracts.Companies;
using ServiceContract.DataContracts.Countries;
using ServiceContract.DataContracts.FileAssets;
using ServiceContract.DataContracts.Manufacturers;
using ServiceContract.DataContracts.Products;
using ServiceContract.FaultContracts;

namespace ServiceContract
{
    /// <summary>
    /// For managing CarModel and related info (Car Manufacturer, Product series...)
    /// </summary>
    [ServiceContract]
    public interface ICarManagementService
    {
        #region Country

        /// <summary>
        /// Add a car manufacturer country
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddCountryResponse AddCountry(AddCountryRequest request);

        /// <summary>
        /// Edit a car manufacturer country
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditCountryResponse EditCountry(EditCountryRequest request);

        /// <summary>
        /// Delete a car manufacturer country
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteCountryResponse DeleteCountry(DeleteCountryRequest request);

        /// <summary>
        /// Get a particular country
        /// </summary>
        /// <param name="countryId">Country Identification</param>
        /// <returns>Country object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetCountryResponse GetCountry(Guid countryId);

        /// <summary>
        /// Get a list of car manufacturer countries
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListCountryResponse ListCountry();

        #endregion

        #region Manufacturer

        /// <summary>
        /// Add a car manufacturer
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddManufacturerResponse AddManufacturer(AddManufacturerRequest request);

        /// <summary>
        /// Edit a car manufacturer
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditManufacturerResponse EditManufacturer(EditManufacturerRequest request);

        /// <summary>
        /// Delete a car manufacturer
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteManufacturerResponse DeleteManufacturer(DeleteManufacturerRequest request);

        /// <summary>
        /// Get a particular manufacturer
        /// </summary>
        /// <param name="manufacturerId">Manufacturer Identification</param>
        /// <returns>Manufacturer object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetManufacturerResponse GetManufacturer(Guid manufacturerId);

        /// <summary>
        /// Get a list of car manufacturers
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListManufacturerResponse ListManufacturer();

        #endregion

        #region Product

        /// <summary>
        /// Add a car product
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddProductResponse AddProduct(AddProductRequest request);

        /// <summary>
        /// Edit a car product
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditProductResponse EditProduct(EditProductRequest request);

        /// <summary>
        /// Delete a car product
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteProductResponse DeleteProduct(DeleteProductRequest request);

        /// <summary>
        /// Get a particular product
        /// </summary>
        /// <param name="fileAsssetId">Product Identification</param>
        /// <returns>Product object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetProductResponse GetProduct(Guid fileAsssetId);

        /// <summary>
        /// Get a list of car products
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListProductResponse ListProduct();

        #endregion

        #region FileAsset

        /// <summary>
        /// Add a file asset (image, doc...)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddFileAssetResponse AddFileAsset(AddFileAssetRequest request);

        /// <summary>
        /// Edit a file asset (image, doc...)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditFileAssetResponse EditFileAsset(EditFileAssetRequest request);

        /// <summary>
        /// Delete a file asset (image, doc...)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteFileAssetResponse DeleteFileAsset(DeleteFileAssetRequest request);

        /// <summary>
        /// Get a particular file
        /// </summary>
        /// <param name="fileAsssetId">FileAsset Identification</param>
        /// <returns>FileAsset object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetFileAssetResponse GetFileAsset(Guid fileAsssetId);

        /// <summary>
        /// Get a list of file assets (image, doc...)
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListFileAssetResponse ListFileAsset();

        #endregion

        #region CarModel

        /// <summary>
        /// Add a car model
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddCarModelResponse AddCarModel(AddCarModelRequest request);

        /// <summary>
        /// Edit a car model
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditCarModelResponse EditCarModel(EditCarModelRequest request);

        /// <summary>
        /// Delete a car model
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteCarModelResponse DeleteCarModel(DeleteCarModelRequest request);

        /// <summary>
        /// Get a particular car model
        /// </summary>
        /// <param name="carModelId">CarModel Identification</param>
        /// <returns>CarModel object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetCarModelResponse GetCarModel(Guid carModelId);

        /// <summary>
        /// Get a list of car models
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListCarModelResponse ListCarModel();

        #endregion

        #region Company

        /// <summary>
        /// Add a company
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        AddCompanyResponse AddCompany(AddCompanyRequest request);

        /// <summary>
        /// Edit a company
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        EditCompanyResponse EditCompany(EditCompanyRequest request);

        /// <summary>
        /// Delete a company
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        DeleteCompanyResponse DeleteCompany(DeleteCompanyRequest request);

        /// <summary>
        /// Get a particular company
        /// </summary>
        /// <param name="companyId">Company Identification</param>
        /// <returns>Company object</returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        GetCompanyResponse GetCompany(Guid companyId);

        /// <summary>
        /// Get a list of companys
        /// </summary>
        /// <returns></returns>
        [FaultContract(typeof(SqlServerFault))]
        [OperationContract]
        ListCompanyResponse ListCompany();

        #endregion
    }
}
